package com.cykj.order.domain.constants;

/**
 * 订单相关常量
 * 
 * @author cykj
 * @date 2025-08-18
 */
public class OrderConstants {
    
    /**
     * 订单状态
     */
    public static class OrderStatus {
        /** 待支付 */
        public static final Integer PENDING_PAYMENT = 0;
        /** 已支付待接单 */
        public static final Integer PAID_PENDING_ACCEPT = 1;
        /** 已接单制作中 */
        public static final Integer ACCEPTED_IN_PRODUCTION = 2;
        /** 配送中 */
        public static final Integer IN_DELIVERY = 3;
        /** 已完成 */
        public static final Integer COMPLETED = 4;
        /** 已取消 */
        public static final Integer CANCELLED = 5;
        /** 已退款 */
        public static final Integer REFUNDED = 6;
        
        /**
         * 获取状态描述
         * 
         * @param status 状态码
         * @return 状态描述
         */
        public static String getStatusDesc(Integer status) {
            if (status == null) return "未知状态";
            switch (status) {
                case 0: return "待支付";
                case 1: return "已支付待接单";
                case 2: return "已接单制作中";
                case 3: return "配送中";
                case 4: return "已完成";
                case 5: return "已取消";
                case 6: return "已退款";
                default: return "未知状态";
            }
        }
    }
    
    /**
     * 支付方式
     */
    public static class PaymentMethod {
        /** 支付宝 */
        public static final Integer ALIPAY = 1;
        /** 余额支付 */
        public static final Integer BALANCE = 2;
        
        /**
         * 获取支付方式描述
         * 
         * @param method 支付方式码
         * @return 支付方式描述
         */
        public static String getMethodDesc(Integer method) {
            if (method == null) return "未知支付方式";
            switch (method) {
                case 1: return "支付宝";
                case 2: return "余额支付";
                default: return "未知支付方式";
            }
        }
    }
    
    /**
     * 评价状态
     */
    public static class ReviewStatus {
        /** 未评价 */
        public static final Integer NOT_REVIEWED = 0;
        /** 已评价 */
        public static final Integer REVIEWED = 1;
        
        /**
         * 获取评价状态描述
         * 
         * @param status 状态码
         * @return 状态描述
         */
        public static String getStatusDesc(Integer status) {
            if (status == null) return "未知状态";
            switch (status) {
                case 0: return "未评价";
                case 1: return "已评价";
                default: return "未知状态";
            }
        }
    }
}
